package com.zzh.interview.service.impl;


import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzh.interview.common.ErrorCode;
import com.zzh.interview.constant.CommonConstant;
import com.zzh.interview.exception.ThrowUtils;
import com.zzh.interview.mapper.QuestionMapper;
import com.zzh.interview.mapper.TagMapper;
import com.zzh.interview.model.dto.question.QuestionEsDTO;
import com.zzh.interview.model.dto.question.QuestionQueryAdminRequest;
import com.zzh.interview.model.dto.question.QuestionQueryESRequest;
import com.zzh.interview.model.dto.question.QuestionQueryRequest;
import com.zzh.interview.model.entity.Question;
import com.zzh.interview.model.entity.QuestionBankQuestion;
import com.zzh.interview.model.entity.Tag;
import com.zzh.interview.model.entity.User;
import com.zzh.interview.model.vo.QuestionQueryVO;
import com.zzh.interview.model.vo.QuestionVO;
import com.zzh.interview.model.vo.UserVO;
import com.zzh.interview.service.QuestionBankQuestionService;
import com.zzh.interview.service.QuestionService;
import com.zzh.interview.service.TagService;
import com.zzh.interview.service.UserService;
import com.zzh.interview.utils.SqlUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.sort.SortBuilder;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.SearchHit;
import org.springframework.data.elasticsearch.core.SearchHits;
import org.springframework.data.elasticsearch.core.query.NativeSearchQuery;
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;

/**
 * 题目服务实现
 *
 * @author <a href="https://github.com/liyupi">程序员鱼皮</a>
 * @from <a href="https://www.code-nav.cn">编程导航学习圈</a>
 */
@Service
@Slf4j
public class TagServiceImpl extends ServiceImpl<TagMapper, Tag> implements TagService {

}

